package com.yjf.service.impl;

import com.yjf.pojo.LagouToken;
import com.yjf.repository.LagouTokenRepository;
import com.yjf.service.LagouTokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * @author Administrator 岳剑飞
 * @date
 * @description:
 */
@Service
public class LgouTokenServiceImpl implements LagouTokenService {

    @Autowired
    private LagouTokenRepository lagouTokenRepository;

    @Override
    public String saveToken(LagouToken lagouToken )  {
        lagouTokenRepository.save(lagouToken);
        return "保存成功";
    }

    @Override
    public LagouToken findMailByToken(String lagouToken )  {
        return lagouTokenRepository.findByToken(lagouToken);
    }
}
